#pragma once
#include "Common.h"
#include "ThreadCache.h"

static void* MyAlloc(size_t size)
{
	if (tls_ptr == nullptr)
		tls_ptr = new ThreadCache;
	//cout << std::this_thread::get_id() << ":" << tls_ptr << std::endl;
	return tls_ptr->Allocate(size);
}
static void MyFree(void* ptr, size_t size)
{
	tls_ptr->DeAllocate(ptr, size);
}